﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 音乐播放盒
{
    public partial class 歌曲来源选择 : Form
    {
        public 歌曲来源选择()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "音乐|*.mp3";
            ofd.Multiselect = true;
            ofd.Title = "本地歌曲添加";
            this.Hide();

            DialogResult dr = ofd.ShowDialog();
            if (dr == DialogResult.OK)
            {
                主窗口 mainForm = (主窗口)this.Owner;
                mainForm.addLocalSong(ofd.FileNames);
            }
            this.Dispose();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();

            netSong = new 网络歌曲添加();
            this.netSong.Owner = this.Owner;
            netSong.ShowDialog();

            this.Dispose();
        }
    }
}
